home *** CD-ROM | disk | FTP | other *** search
/ Champak 128 / Vol 128 (Damaged).iso / games / scooby_d.swf / scripts / __Packages / com / ndimedia / containers / View.as
Encoding:
Text File  |  2011-03-26  |  1.3 KB  |  65 lines

  1. class com.ndimedia.containers.View extends com.ndimedia.display.Sprite
  2. {
  3.    var m_aChildren;
  4.    var m_bAnimated;
  5.    var m_x;
  6.    var m_y;
  7.    var m_intro;
  8.    var m_outro;
  9.    function View(scope, d)
  10.    {
  11.       super(scope,d);
  12.       this.m_aChildren = new Array();
  13.       this.m_bAnimated = false;
  14.       this.setPosition(0,0);
  15.       this.hide();
  16.    }
  17.    function addChild(s)
  18.    {
  19.       this.m_aChildren.push(s);
  20.    }
  21.    function get children()
  22.    {
  23.       return this.m_aChildren;
  24.    }
  25.    function repaint()
  26.    {
  27.    }
  28.    function setPosition(x, y)
  29.    {
  30.       this.m_x = x;
  31.       this.m_y = y;
  32.    }
  33.    function hide()
  34.    {
  35.       this.graphics._x = 5000;
  36.    }
  37.    function show()
  38.    {
  39.       this.graphics._x = this.m_x;
  40.       this.graphics._y = this.m_y;
  41.    }
  42.    function getPosition()
  43.    {
  44.       return new com.ndimedia.math.alg.Point(this.m_x,this.m_y);
  45.    }
  46.    function getSize()
  47.    {
  48.       return new com.ndimedia.math.geom.Rect(this.graphics._width,this.graphics._height);
  49.    }
  50.    function get animated()
  51.    {
  52.       return this.m_bAnimated;
  53.    }
  54.    function setAnims(intro, outro)
  55.    {
  56.       this.m_intro = intro;
  57.       this.m_outro = outro;
  58.       this.m_bAnimated = true;
  59.    }
  60.    function toString()
  61.    {
  62.       return "View";
  63.    }
  64. }
  65.